Repository navigation
fix(lanes): up --workers runs the workers of a lane on a node too (#314) - #321
Merged
Merged
Conversation
…314) The flag never left this machine: the lane's daemon on the node ran without `lane_workers`, so `{is_main}` stayed false and jobs stayed queued with nothing saying so. - `--workers` goes with the start: `Lanes::workers`, `RemoteSpec::workers`, the node's `Start.workers`, `DEVSTACK_LANE_WORKERS=1` in the lane container; the daemon there sets it (or its profile's `workers`). - It stays with the lane on a move (both ways) and across a restart (`CarriedLane.workers`, local lanes too). - `LaneView.workers`; `lane list` names lanes that run their workers. - A node before 0.25.1 does not take it: the start warns. - `up --workers` on a lane that runs already says it applies at its next start, on a node as here. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #314.
Cause
--workerssetlane_workerson a local lane's supervisor only (api.rs). For a lane on a node it was never sent: neither the lease nor the node's start knew it, so the lane's daemon there decided workers by the main slot alone (owns_main()=REMOTE_MAIN),{is_main}wasfalse, and jobs stayedqueued, with nothing saying so.Fix
activate_remote(.., workers)keeps it inLanes::workers;with_specputs it inRemoteSpec::workers→NodeClient::start(.., workers, ..)→ the node'sStart.workers(serde default, skipped when false) →LaneRun.workers→-e DEVSTACK_LANE_WORKERS=1on the lane container.lib.rs): a remote lane setslane_workersfrom its profile'sworkers, else fromDEVSTACK_LANE_WORKERS, asapi.rsdoes for a local lane.CarriedLane.workers, also for local lanes, which lost it before). Cleared when the lane stops.LaneView.workers;devstack lane listnotes "runs its background workers".--on localruns them.up --workerson a lane that runs already notes that it applies at its next start, now also on a node.Tests
remote_lane.rs(CI jobremote-lane, Linux node): the first start reports"workers":falseon/info; afterlane reset,up --workers --on ci-nodereports"workers":trueandlane listnames it.cargo testdevstack, devstack-daemon, devstack-node; clippy clean; ui typecheck.🤖 Generated with Claude Code